package com.ivo.model.hr;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

@Entity
@Table( name = "HR_O_Department" )
public class Department
{
	@Id
	@Column( name = "ID" )
	private String id;
	@Column( name = "Name" )
	private String name;
	@Column( name = "Name_EN" )
	private String name_EN;
	@Column( name = "ShortName" )
	private String shortName;
	@Column( name = "Parent_FK" )
	private String parent_FK;
	@Column( name = "Head_FK" )
	private String head_FK;
	@Column( name = "DeptPath" )
	private String deptPath;
	@Column( name = "DeptLevel" )
	private int deptLevel;
	@Column( name = "CostCenter_FK" )
	private String costCenter_FK;
	private int CollapseFlag;
	private int TransparentFlag;

	public String getId() {
		return id;
	}

	public void setId( String id ) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName( String name ) {
		this.name = name;
	}

	public String getName_EN() {
		return name_EN;
	}

	public void setName_EN( String name_EN ) {
		this.name_EN = name_EN;
	}

	public String getShortName() {
		return shortName;
	}

	public void setShortName( String shortName ) {
		this.shortName = shortName;
	}

	public String getParent_FK() {
		return parent_FK;
	}

	public void setParent_FK( String parent_FK ) {
		this.parent_FK = parent_FK;
	}

	public String getHead_FK() {
		return head_FK;
	}

	public void setHead_FK( String head_FK ) {
		this.head_FK = head_FK;
	}

	public String getDeptPath() {
		return deptPath;
	}

	public void setDeptPath( String deptPath ) {
		this.deptPath = deptPath;
	}

	public int getDeptLevel() {
		return deptLevel;
	}

	public void setDeptLevel( int deptLevel ) {
		this.deptLevel = deptLevel;
	}

	public String getCostCenter_FK() {
		return costCenter_FK;
	}

	public void setCostCenter_FK( String costCenter_FK ) {
		this.costCenter_FK = costCenter_FK;
	}

	public int getCollapseFlag() {
		return CollapseFlag;
	}

	public void setCollapseFlag( int collapseFlag ) {
		CollapseFlag = collapseFlag;
	}

	public int getTransparentFlag() {
		return TransparentFlag;
	}

	public void setTransparentFlag( int transparentFlag ) {
		TransparentFlag = transparentFlag;
	}

	@Transient
	public String getDeptName( String separator ) {
		return this.shortName + separator + this.name;
	}

	@Override
	public String toString() {
		return this.shortName + " / " + this.name;
	}
}
